/**
 * Copyright (C), 2002-2017, 上海巧房信息技术有限公司
 * FileName: CollectRuleServiceConvert
 * @Author:     yi.li
 * Date:     2018/6/29 17:18
 * Description: 采集规则服务转换器
 * History: //修改记录
 * <author>      <time>      <version>    <desc>
 * 修改人姓名             修改时间            版本号                  描述
 */
package com.qiaofang.collectmanage.dao.util;

import com.alibaba.fastjson.JSONObject;
import com.qiaofang.collectmanage.dao.domain.CollectRule;
import com.qiaofang.collectmanage.stub.bean.CrawlerCollectRuleDTO;
import com.qiaofang.collectmanage.stub.bean.SaveOperatorLogDTO;

public class OperatorLogDaoConvert {

    private OperatorLogDaoConvert(){}

    public static JSONObject convertOperatorLogDtoToJSONObjectCollect(SaveOperatorLogDTO saveOperatorLogDTO) {
        if (saveOperatorLogDTO == null) {
            return null;
        }
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("logUuid",saveOperatorLogDTO.getLogUuid());
        jsonObject.put("content",saveOperatorLogDTO.getContent());
        jsonObject.put("createdTime",saveOperatorLogDTO.getCreatedTime());
        jsonObject.put("createdUserName",saveOperatorLogDTO.getCreatedUserName());
        jsonObject.put("operatorType",saveOperatorLogDTO.getOperatorType());
        return jsonObject;
    }




}
